<?php


namespace App\Commons\Domain\Module\Financial\Service;


use App\Commons\Domain\Core\DomainService;
use App\Commons\Domain\Module\Financial\Entity\WalletEntity;

class FinancialService extends DomainService
{
    /**
     * 冻结账户资金
     * @param int $wallet_id
     * @param float $amount
     * @return mixed
     */
    public function freeze(int $wallet_id, float $amount)
    {
        return app(WalletEntity::class)->freeze($wallet_id, $amount);
    }

    /** 释放冻结金额
     * @param int $wallet_id
     * @param float $amount
     * @return mixed
     */
    public function freedFreeze(int $wallet_id, float $amount)
    {
        return app(WalletEntity::class)->freedFreeze($wallet_id, $amount);
    }

    /**
     * 减少冻结金额
     * @param int $wallet_id
     * @param float $amount
     * @return mixed
     */
    public function cutFreeze(int $wallet_id, float $amount)
    {
        return app(WalletEntity::class)->cutFreeze($wallet_id, $amount);
    }


}
